package com.fire.user.model;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * 微信用户表
 * </p>
 *
 * @author MIT123
 * @since 2018-04-17
 */
@TableName("t_mit_user_wx")
public class UserWx extends Model<UserWx>implements Serializable {
	
	private static final long serialVersionUID = 1L;

	/**
	 * 微信openid
	 * */
	private String openid;
	
	 /**
     * 用户id
     */
    @TableId(value = "userid", type = IdType.INPUT)
	private Integer userid;
    
    /**
     * 微信token
     * */
	private String wxtoken;
	
	/**
	 * 微信refreshtoken
	 * */
	private String refreshtoken;
	
	/**
	 * 失效时间
	 * */
	private Date expiretime;

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public Integer getUserid() {
		return userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}

	public String getWxtoken() {
		return wxtoken;
	}

	public void setWxtoken(String wxtoken) {
		this.wxtoken = wxtoken;
	}

	public String getRefreshtoken() {
		return refreshtoken;
	}

	public void setRefreshtoken(String refreshtoken) {
		this.refreshtoken = refreshtoken;
	}

	public Date getExpiretime() {
		return expiretime;
	}

	public void setExpiretime(Date expiretime) {
		this.expiretime = expiretime;
	}
	
	 @Override
	    public String toString() {
	        return "UserWx{" +
	        "userid=" + userid +
	        ", openid=" + openid +
	        ", wxtoken=" + wxtoken +
	        ", expiretime=" + expiretime +
	        "}";
	    }

	@Override
	protected Serializable pkVal() {
		 return this.userid;
	}
}
